import http from "@/utils/request";

//配置前端请求api

//请求首页数据
export const getHomeData = () => {
    // 返回一个promise对象
    return http.get('/home/getHomeData')  //请求地址
}

// 获取用户列表
export const getUser = (params) => {
    return http.get('/user/getUser', params)
}
// 新增用户
export const addUser = (data) => {
    return http.post('/user/add', data)
}
// 编辑用户
export const editUser = (data) => {
    return http.post('/user/edit', data)
}
// 删除用户
export const delUser = (data) => {
    return http.post('/user/del', data)
}